package com.ljfresh.customer.result;

import com.ljfresh.customer.data.LoadEditData;
import com.ljfresh.customer.data.LoginData;
import com.ljfresh.customer.exception.ErrorMap;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author: Lucifer
 * @time: 2020/4/13-16:29
 */
@ApiModel
@Data
@NoArgsConstructor
public class LoadEditResult extends Result {


    @ApiModelProperty("编辑页面加载数据")
    private LoadEditData data;

    public LoadEditResult(Integer code){
        this.code = code;
        this.message = ErrorMap.map.get(code);
    }

    public LoadEditResult(LoadEditData data) {
        this.code = 0;
        this.message = "请求成功!";
        this.data = data;
    }
}
